package y23.Apr;

public class Sum {
    public static void main(String[] args) {
        int i = 0;
        int flag = 1;
        double sum = 0;
        for(i=1; i<=100; ++i){
            sum += flag*1.0/i;
            flag = -flag;
        }
        System.out.println(sum);
    }
}
